package grouplife::Controller::Logout;
use Moose;
use namespace::autoclean;
use Catalyst qw/
Session
Session::Store::FastMmap
Session::State::Cookie
/;


BEGIN {extends 'Catalyst::Controller'; }

=head1 NAME

grouplife::Controller::Logout - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut


=head2 index

=cut

sub index :Path :Args(0) {
	my ($self, $c) = @_;

# Clear the user's state
	$c->logout;
	undef $c->session->{login_user};

# Send the user to the starting point
	$c->response->redirect($c->uri_for('/'));

}

=head1 AUTHOR

lijie,,,

=head1 LICENSE

This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

__PACKAGE__->meta->make_immutable;

1;
